package com.joinway.extension.socket.serializer;



/**
 * the byte was unsigned
 * @author Administrator
 *
 */
public class MonoByteShortSerializer implements ISegmentSerializer<Short> {

	@Override
	public Short deserialize(byte...bytes) {
		return (short)(0x00FF & bytes[0]);
	}

	@Override
	public byte[] serialize(Short data) {
		return new byte[]{(byte)(0x00FF & data)};
	}

}
